#ifndef __DTU_H__
#define __DTU_H__


//#include "mqtt_demo.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include "zq_app.h"


// #include "ql_api_osi.h"

// #include "ql_log.h"
// #include "ql_api_datacall.h"
// #include "ant_gprs.h"
// #include "../../http_fota/inc/fota_http_demo.h"
// #include "ql_api_dev.h"
// #include "ql_api_nw.h"
// #include "ql_api_sim.h"
// #include "gl_variable.h"
// #include "akm_app.h"

#define QL_CUR_UART_PORT            QL_UART_PORT_1
#define ZQ_RX_MAX_SIZE              (512+32)	// 最大情况出现在OTA, 一帧大小为5+6+512)
//#define ZQ_TX_MAX_SIZE              (1024)
// #define QL_USB_PRINTER_ENABLE	            (0)


// #define CONFIG_DEV_GC3S					(300)
// #define CONFIG_DEV_GC1S					(100)
// #define CONFIG_DEV_SW					CONFIG_DEV_GC3S

#define ZQ_BYTE2UINT(x) (uint32_t)((*(uint8_t *)(x) << 24) + (*((uint8_t *)(x)+1) << 16) + (*((uint8_t *)(x)+2) << 8) + *((uint8_t *)(x)+3))

extern void zq_dtu_start( void );
extern int dtu_cmd01(DtuC01ResponsePkg* pInfo);
extern int dtu_cmd02(DtuC02RequestPkg *cmd_pkg, DtuC02ResponsePkg *recv);
extern int dtu_cmd03(DtuC03ReqRespPkg* pDev);
extern int dtu_cmd10(void);
extern int dtu_cmd11(unsigned int offset, char *data, short size);
extern int dtu_cmd12(char *data, int len);
extern int dtu_cmd75(void);

#endif // __FTM_H__

